package com.kc.business.service.impl;

import com.kc.business.domain.BizMarket;
import com.kc.business.mapper.BizMarketMapper;
import com.kc.business.service.IBizMarketService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * TODO
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/10/14
 */
@Service
public class BizMarketServiceImpl implements IBizMarketService {
    @Resource
    BizMarketMapper marketMapper;

    /**
     * 市场列表
     *
     * @param market
     * @return
     */
    @Override
    public List<BizMarket> getList(BizMarket market) {
        return marketMapper.select(market);
    }

    /**
     * 修改市场
     *
     * @param market
     * @return
     */
    @Override
    public int edit(BizMarket market) {
        return marketMapper.updateByPrimaryKeySelective(market);
    }

    /**
     * 添加市场
     *
     * @param market
     * @return
     */
    @Override
    public int add(BizMarket market) {
        return marketMapper.insert(market);
    }
}
